Skip to content

Use external ADR rulesets#55

Draft
dvh wants to merge 7 commits intomainfrom
use-npm-package
Draft

Use external ADR rulesets#55
dvh wants to merge 7 commits intomainfrom
use-npm-package

Conversation

@dvh
Copy link
Copy Markdown
Contributor

@dvh dvh commented Apr 29, 2026

No description provided.

@dvh dvh requested review from Copilot and pasibun and removed request for Copilot April 29, 2026 14:20
@dvh dvh requested a review from Copilot April 29, 2026 14:21
@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JSON Pass ✅
OPENAPI Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the OAS validator from locally stored Spectral ADR ruleset YAML files to externally maintained ADR rulesets, so ruleset updates can be consumed via a dependency instead of repository file changes.

Changes:

  • Replace filesystem/YAML-based Spectral ruleset loading with dynamic imports from @developer-overheid-nl/adr-rulesets.
  • Expand measured rule-code mappings to include nlgov:-prefixed rule codes.
  • Remove local ADR ruleset YAML files and adjust npm dependencies accordingly.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/OasValidatorService.js Loads ADR rulesets via external package loaders and updates measured rule-code mappings.
rulesets/ruleset_2.0.yaml Removes local ruleset file (now sourced externally).
rulesets/ruleset_2.1.yaml Removes local ruleset file (now sourced externally).
package.json Adds external ADR rulesets dependency and adds explicit @stoplight/spectral-core.
package-lock.json Locks new git-sourced ADR rulesets dependency and related dependency graph updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines 21 to 26
"@apiture/openapi-down-convert": "^0.14.2",
"@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main",
"@redocly/cli": "^2.20.5",
"@scalar/openapi-upgrader": "^0.2.3",
"@stoplight/spectral-core": "^1.21.0",
"@stoplight/spectral-parsers": "^1.0.5",
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De dependency @developer-overheid-nl/adr-rulesets wordt vanaf de main branch van GitHub geïnstalleerd. Dat maakt builds niet reproduceerbaar en resulteert (zie ook package-lock) in een git/SSH fetch, wat vaak faalt in CI/Docker omgevingen zonder git/SSH keys. Pin naar een vaste release/tag/commit en gebruik een HTTPS git URL of (liever) een gepubliceerde npm-versie.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to 13
const RULESET_LOADERS = {
"2.0": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-20"),
"2.1": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-21"),
"2.2": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-22"),
draft: () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-draft"),
};
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De validator accepteert nu ook targetVersion "2.2" en "draft" (via RULESET_LOADERS). In api/openapi.json staat bij OASInput en de /v1/oas/validate beschrijving nog dat validatie alleen 2.0 of 2.1 ondersteunt. Werk de API-specificatie/contracttekst bij, of beperk de toegestane versies hier tot wat publiek gedocumenteerd is.

Copilot uses AI. Check for mistakes.
pasibun and others added 4 commits April 30, 2026 08:39
- Changed license from Unlicense to EUPL-1.2
- Updated @redocly/cli from ^2.20.5 to ^2.30.2
- Updated @scalar/openapi-upgrader from ^0.2.3 to ^0.2.6
- Updated @stoplight/spectral-rulesets from ^1.22.0 to ^1.22.1
- Updated @stoplight/spectral-runtime from ^1.1.4 to ^1.1.5
- Updated express from ^5.1.0 to ^5.2.1
- Updated openapi-to-postmanv2 from ^5.3.4 to ^6.0.1
- Updated @biomejs/biome from ^2.3.4 to ^2.4.13 [deploy-test]
Co-authored-by: Copilot <copilot@github.com>
@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JSON Pass ✅
OPENAPI Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JSON Pass ✅
OPENAPI Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JSON Pass ✅
OPENAPI Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JSON Pass ✅
OPENAPI Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

3 participants